from ogreEx.blender.types import Operator
from ogreEx.context import getTundraSingleton
from ogreEx.ui.UIClass import OPERATOR

@OPERATOR
class Tundra_StartPhysicsOp(Operator):
    '''TundraSingleton helper'''
    bl_idname = 'tundra.start_physics'
    bl_label = "start physics"
    bl_options = {'REGISTER'}
    
    @classmethod
    def poll(cls, context):
        if getTundraSingleton(): return True
    def invoke(self, context, event):
        getTundraSingleton().start()
        return {'FINISHED'}